<html>
<head>
<title>Registration Form</title>
<style type="text/css">

form li{
	list-style:none;
}
</style>
</head>
<body>
<h1>User Registration</h1>
<p>Please Fill in the details below</p>
<!-- gamit ka short tags para sa PHP na code sa view -->
<!-- instead na muni .. -->
<?php echo validation_errors(); ?>
<!-- muni gamitun mu.. -->
<!-- <?= validation_errors(); ?> -->
<!-- parehus lng ni sila na duwa.. -->

<!-- same para sa diri.. kg sala gale imu na url.. ndi "form", kundi "form/index" gd dapat.. -->
<?php echo form_open('form', 'id="register_form"'); ?>

<h5>Username</h5>
<input type="text" name="username" value="<?php echo set_value('username'); ?>" size="50" />

<h5>Password</h5>
<input type="text" name="password" value="<?php echo set_value('password'); ?>" size="50" />

<h5>Password Confirm</h5>
<input type="text" name="passconf" value="<?php echo set_value('passconf'); ?>" size="50" />

<h5>Email Address</h5>
<input type="text" name="email" value="<?php echo set_value('email'); ?>" size="50" />

<div><input type="submit" value="Submit" /></div>

<script>
$(function(){
	$('#register_form').validate({
		rules: {
			username: {required:true, minlength:4},
			email: {required:true, email:true},
			password: {required:true, minlength:4},
			passconf: {required:true, equalTo:'#password'}
		}
	//remove lng danay ang errorPlacement..
	});
});
</script>

</body>
</html>